\chapter{Results}
\label{sec:result}
\section{Testing environment}
The test application was run on a laptop computer with the specifications found in Table \ref{table:spec}.

\begin{table}[htbp]

\begin{center}
	\begin{tabular}{| l | l | }
		\hline
  		Processor & Intel Core2Duo CPU T8300, 2.40GHz  \\ \hline
  		RAM & 2GB  \\ \hline
  		Graphics card  & Intel Corporation Mobile GM965  \\ \hline
  		Hard drive  & 5400 rpm  \\ \hline
  		Operating system  & Ubuntu 10.04  \\ \hline
	\end{tabular}
	\caption{Test computer specifications}
	\label{table:spec}
\end{center}
\end{table}


\section{Testing setup}
The people detection and gesture recognition was tested using a data set consisting of 5 different gestures performed by 12 different people. The people in the test data set are all adults, but with variations in size, gender, age and skin color.

Before performing the gestures they were given a drawing of what the gesture was approximately to look like, and a short explanation of its purpose i.e. "threat" or "give something". This setup was to mimic a user situation where people may be given an instruction of how to interact with the system and then interpret this instruction in slightly different ways. The stick figure instructions are shown in Figure \ref{fig:gestures}.

The dataset recorded for each gesture and test subject consists of 65 frames, which with the time resolution of the Kinect device corresponds to between 2 and 3 seconds. 

An example of the RGB output is shown in Figure \ref{fig:gesture0}. In Figure \ref{fig:gesture0d} the corresponding depth images are shown. These have been mapped to show a red value, instead of their original 16 bit greyscale value.

\begin{figure}[htbp]
  \centering
  \subfloat[Intimidating]{\label{fig:g0}\includegraphics[height=0.2\textwidth, width=0.12\textwidth]{fig/gesture0.eps}}    
  \hspace{10px}            
  \subfloat[Inviting]{\label{fig:g1}\includegraphics[height=0.2\textwidth, width=0.12\textwidth]{fig/gesture1.eps}}
  \hspace{10px} 
  \subfloat[Giving food]{\label{fig:g2}\includegraphics[height=0.2\textwidth, width=0.08\textwidth]{fig/gesture2.eps}}\\
  \hspace{10px} 
  \subfloat[Violent]{\label{fig:g3}\includegraphics[height=0.2\textwidth, width=0.2\textwidth]{fig/gesture3.eps}}
  \hspace{10px} 
  \subfloat[Secret sign]{\label{fig:g4}\includegraphics[height=0.2\textwidth, width=0.1\textwidth]{fig/gesture4.eps}}

  \caption{Gestures as shown to test subjects}
  \label{fig:gestures}
\end{figure}

\begin{figure}[htbp]
  \centering
  \subfloat{\label{fig:12_0}\includegraphics[width=0.2\textwidth]{fig/seq/0_12_0.eps}}               
  \subfloat{\label{fig:12_1}\includegraphics[width=0.2\textwidth]{fig/seq/0_12_1.eps}}
  \subfloat{\label{fig:12_2}\includegraphics[width=0.2\textwidth]{fig/seq/0_12_2.eps}}
  \subfloat{\label{fig:12_3}\includegraphics[width=0.2\textwidth]{fig/seq/0_12_3.eps}}
  \subfloat{\label{fig:12_4}\includegraphics[width=0.2\textwidth]{fig/seq/0_12_4.eps}}\\
  \subfloat{\label{fig:12_5}\includegraphics[width=0.2\textwidth]{fig/seq/0_12_5.eps}}               
  \subfloat{\label{fig:12_6}\includegraphics[width=0.2\textwidth]{fig/seq/0_12_6.eps}}
  \subfloat{\label{fig:12_7}\includegraphics[width=0.2\textwidth]{fig/seq/0_12_7.eps}}
  \subfloat{\label{fig:12_8}\includegraphics[width=0.2\textwidth]{fig/seq/0_12_8.eps}}
  \subfloat{\label{fig:12_9}\includegraphics[width=0.2\textwidth]{fig/seq/0_12_9.eps}}
  \caption{RGB image of person performing Intimidating gesture}
  \label{fig:gesture0}
\end{figure}

\begin{figure}[htbp]
  \centering
  \subfloat{\label{fig:12_0d}\includegraphics[width=0.2\textwidth]{fig/seq/0_12_0d.eps}}               
  \subfloat{\label{fig:12_1d}\includegraphics[width=0.2\textwidth]{fig/seq/0_12_1d.eps}}
  \subfloat{\label{fig:12_2d}\includegraphics[width=0.2\textwidth]{fig/seq/0_12_2d.eps}}
  \subfloat{\label{fig:12_3d}\includegraphics[width=0.2\textwidth]{fig/seq/0_12_3d.eps}}
  \subfloat{\label{fig:12_4d}\includegraphics[width=0.2\textwidth]{fig/seq/0_12_4d.eps}}\\
  \subfloat{\label{fig:12_5d}\includegraphics[width=0.2\textwidth]{fig/seq/0_12_5d.eps}}               
  \subfloat{\label{fig:12_6d}\includegraphics[width=0.2\textwidth]{fig/seq/0_12_6d.eps}}
  \subfloat{\label{fig:12_7d}\includegraphics[width=0.2\textwidth]{fig/seq/0_12_7d.eps}}
  \subfloat{\label{fig:12_8d}\includegraphics[width=0.2\textwidth]{fig/seq/0_12_8d.eps}}
  \subfloat{\label{fig:12_9d}\includegraphics[width=0.2\textwidth]{fig/seq/0_12_9d.eps}}
  \caption{Depth image of person performing Intimidating gesture}
  \label{fig:gesture0d}
\end{figure}

\section{Gesture recognition results}
As shown in table \ref{table:res_hh}, the accuracy of the gesture recognition system is on average XX\%. Some gestures are similar, such as the "Inviting" and "Giving food" gestures. They both include a forward and backward arm movement, which makes it difficult for the system to distinguish between them.

\begin{table}[htbp]
	
	\begin{center}
	\begin{tabular}{| l | c | }
		\hline
  		Gesture 1 & 0.x  \\ \hline
  		Gesture 2 & 0.x  \\ \hline
  		Gesture 3  & 0.x  \\ \hline
  		Gesture 4  & 0.x  \\ \hline
  		Gesture 5  & 0.x  \\ \hline
	\end{tabular}
	\caption{Correct recognition of gesture}
	\label{table:res_hh}
	\end{center}	
\end{table}

\subsection{Gesture spotting}
Different sizes of the detection time frame where tested, and also combined with different sizes of the feature array. A comparison of the results with different values can be seen in Table \ref{table:res_spotting}.

\begin{table}[htbp]
	
	\begin{center}
	\begin{tabular}{| l | c | c | c| c |}
		\hline
		\textbf{Gesture}  & 10 & 20 & 50 & 100  \\ \hline
  		Intimidating & 0.x & 0 & 0 & 0 \\ \hline
  		Inviting & 0.x & 0 & 0 & 0 \\ \hline
  		Giving food  & 0.x & 0 & 0 & 0 \\ \hline
  		Violent  & 0.x  & 0 & 0 & 0\\ \hline
  		Secret sign  & 0.x  & 0 & 0 & 0\\ \hline
	\end{tabular}
	\caption{Correct recognition of gesture using different time frame sizes}
	\label{table:res_spotting}
	\end{center}	
\end{table}

\subsection{Prototype amount}
Each prototype belongs to a class of gestures. Different sizes of these classes were tested to see how the amount of prototypes affect the resulting accuracy and time consumption. The result is shown in Table \ref{table:res_proamount}.

\begin{table}[htbp]
	
	\begin{center}
	\begin{tabular}{| l | c | c | c| c |}
		\hline
		\textbf{Gesture}  & 1 & 3 & 5 & 10  \\ \hline
  		Intimidating & 0.x & 0 & 0 & 0 \\ \hline
  		Inviting & 0.x & 0 & 0 & 0 \\ \hline
  		Giving food  & 0.x & 0 & 0 & 0 \\ \hline
  		Violent  & 0.x  & 0 & 0 & 0\\ \hline
  		Secret sign  & 0.x  & 0 & 0 & 0\\ \hline
	\end{tabular}
	\caption{Correct recognition of gesture using different amounts of prototypes}
	\label{table:res_proamount}
	\end{center}	
\end{table}


